Commutativity Condition Refinement
نویسندگان
چکیده
We present a technique for automatically generatingcommutativity conditions from (abstract-level) data-structurespecifications. We observe that one can pose the commutativityquestion in a way that does not introduce additional quantifiers,via a mechanized lifting of a (potentially partial) specificationto an equivalent total specification. We then describe an al-gorithm that iteratively refines an under-approximation of thecommutativity (and non-commutativity) condition for two data-structure methods m and n into an increasingly precise version.Our algorithm terminates if/when the entire state space hasbeen considered, and can be aborted at any time to obtain apartial, sound commutativity condition. We prove soundness,relative completeness, describe how to obtain input predicates,and discuss heuristics to improve qualitative aspects of ouralgorithm’s output.We have implemented our technique in a tool called SERVOIS,which uses an SMT solver. We show that we can automaticallygenerate symbolic commutativity conditions for a range of datastructures including Set, HashTable, Accumulator, Counter, andStack. This work has the potential to impact a variety of contexts,in particular, multicore software where it has been realized thatcommutativity is at the heart of increased concurrency.
منابع مشابه
Automatic Generation of Precise and Useful Commutativity Conditions (Extended Version)
Reasoning about commutativity between data-structure operations is an important problem with applications including parallelizing compilers, optimistic parallelization and, more recently, Ethereum smart contracts. There have been research results on automatic generation of commutativity conditions, yet we are unaware of any fully automated technique to generate conditions that are both sound an...
متن کاملAutomatic Generation of Precise and Useful Commutativity Conditions
Reasoning about commutativity between data-structure operations has been, and remains, an important problem with applications including parallelizing compilers, optimistic parallelization and, more recently, Ethereum smart contracts. There have been research results on automatic generation of commutativity conditions, yet we are unaware of any fully automated technique to generate conditions th...
متن کاملA COMMUTATIVITY CONDITION FOR RINGS
In this paper, we use the structure theory to prove an analog to a well-known theorem of Herstein as follows: Let R be a ring with center C such that for all x,y ? R either [x,y]= 0 or x-x [x,y]? C for some non negative integer n= n(x,y) dependingon x and y. Then R is commutative.
متن کامل. C T ] 2 9 Ju n 20 05 Associativity as Commutativity
It is shown that coherence conditions for monoidal categories concerning associativity are analogous to coherence conditions for strict symmetric monoidal categories, where associativity arrows are identities. Mac Lane’s pentagonal coherence condition for associativity is decomposed into conditions concerning commutativity, among which we have a condition analogous to naturality and a degenerat...
متن کامل0 Se p 20 05 Associativity as Commutativity
It is shown that coherence conditions for monoidal categories concerning associativity are analogous to coherence conditions for symmetric strictly monoidal categories, where associativity arrows are identities. Mac Lane’s pentagonal coherence condition for associativity is decomposed into conditions concerning commutativity, among which we have a condition analogous to naturality and a degener...
متن کامل